package io.gitee.mojingjiao.day07;

import org.junit.Test;

import java.io.File;

public class TestFile {
    @Test
    public void testFileInterator(){
        String dir="src\\io\\gitee\\mojingjiao";
        listDirectory(new File(dir));
    }
    public void listDirectory(File file){
      File[] files=file.listFiles();
      for(File f:files){
          System.out.println(f.getAbsolutePath());

     if(f.isDirectory()){
            listDirectory(f);
        }
      }
    }






}
